{
    "layer": "top",
    "height": 25,
    "spacing": 4,

    "modules-left": ["sway/workspaces", "sway/mode", "custom/media", "sway/window"],
    "modules-center": ["clock"],
    "modules-right": ["custom/playerctl", "pulseaudio", "network", "cpu", "memory", "keyboard-state", "sway/language", "battery", "tray"],

    "sway/workspaces": {
        "disable-scroll": true,
        "all-outputs": true,
        "format": "{name}",
    },

    "keyboard-state": {
        "numlock": true,
        "capslock": true,
        "format": "{name} {icon}",
        "format-icons": {
            "locked": "",
            "unlocked": ""
        }
    },

    "sway/mode": {
        "format": "<span style=\"italic\">{}</span>"
    },

    "tray": {
        // "icon-size": 21,
        "spacing": 10
    },

    "clock": {
        "format": "{:%A %e %I.%M %p}",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "format-alt": "{:%d.%m.%Y %I:%M %p}"
    },

    "cpu": {
        "format": "{usage}% ",
        "tooltip": false
    },

    "memory": {
        "format": "{}% "
    },

    "battery": {
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 15
        },

        "format": "{capacity}% {icon}",
        "format-charging": "{capacity}% ",
        "format-plugged": "{capacity}% ",
        "format-alt": "{time} {icon}",
        "format-good": "{capacity}%",
        "format-full": "",
    },

   "network": {
        "format-wifi": "{essid}",
        "format-ethernet": "Ethernet",
        "tooltip-format": "{ifname} via {gwaddr}",
        "format-linked": "{ifname}",
        "format-disconnected": "Disconnected",
        "format-alt": "{ifname}",
    },

    "pulseaudio": {
        "scroll-step": 10,
        "format": "{volume}% {format_source}",
        "format-bluetooth": "{volume}%  {format_source}",
        "format-bluetooth-muted": "muted  {format_source}",
        "format-muted": "muted {format_source}",
        "format-source": "{volume}% ",
        "format-source-muted": "",
        "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
    },
    "custom/playerctl": {
		"format": "{}",
		"return-type": "json",
		"max-length": 40,
		"exec": "$HOME/.config/scripts/waybar-playerctl 2> /dev/null",
		"on-click": "playerctl play-pause",
		"on-right-click": "sys-notif media",
		"on-scroll-up": "playerctl position 3+",
		"on-scroll-down": "playerctl position 3-"
	}
}
